package com.alibaba.nacos.plugin.datasource.impl.oracle;

import com.alibaba.nacos.plugin.datasource.mapper.ConfigInfoGrayMapper;
import com.alibaba.nacos.plugin.datasource.model.MapperContext;
import com.alibaba.nacos.plugin.datasource.model.MapperResult;

import java.util.Collections;

public class ConfigInfoGrayMapperByOracle extends AbstractOracleMapper implements ConfigInfoGrayMapper {
    @Override
    public MapperResult findAllConfigInfoGrayForDumpAllFetchRows(MapperContext context) {
        int startRow = context.getStartRow();
        int pageSize = context.getPageSize();
        String sql = " SELECT id,data_id,group_id,tenant_id,gray_name,gray_rule,app_name,content,md5,gmt_modified  FROM  config_info_gray  ORDER BY id";
        return new MapperResult(getDatabaseDialect().getLimitPageSqlWithOffset(sql, +startRow, pageSize), Collections.emptyList());
    }
}
